package cn.funeralobjects.dictms.web.controller;

import cn.funeralobjects.common.service.CommonCloudCrudService;
import cn.funeralobjects.common.web.controller.CommonCloudCrudController;
import cn.funeralobjects.common.web.controller.converter.ModelMapper;
import cn.funeralobjects.dictms.entity.EDict;
import cn.funeralobjects.dictms.model.Dict;
import cn.funeralobjects.dictms.service.DictService;
import cn.funeralobjects.dictms.web.api.DictApi;
import cn.funeralobjects.dictms.web.mapper.DictMapper;
import cn.funeralobjects.dictms.web.model.MDict;
import cn.funeralobjects.dictms.web.model.VDict;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author FuneralObjects
 * Create date: 2020/6/5 10:18 AM
 */
@RestController
@RequestMapping("/dict")
public class DictController implements DictApi, CommonCloudCrudController<VDict, MDict, Dict, EDict, Integer> {

    @Resource
    private DictService dictService;
    @Resource
    private DictMapper dictMapper;


    @Override
    public CommonCloudCrudService<Dict, EDict, Integer> commonCloudCrudService() {
        return dictService;
    }

    @Override
    public ModelMapper<MDict, Dict, EDict, VDict> modelMapper() {
        return dictMapper;
    }
}
